﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RKConsulting.Helpers
{
    public static class DateHelper
    {
        public static int ComputeAge(DateTime birthday)
        {
            var now = DateTime.Today;
            var age = now.Year - birthday.Year;
            if (now < birthday.AddYears(age))
                age--;

            return age;
        }
    }
}
